angular.module('app.service', ['ngResource', 'ngCookies'])
    //print
    .service('PrintService', ['$resource', function ($resource) {

        /*this.printlong = function (printid, devid, title, success, error) {
            var resource = $resource(testurl + "long");
            return resource.save({printid: printid, devid: devid, title: title}, {}, success, error);
        }
        this.printmedium = function (printid, devid, title, success, error) {
            var resource = $resource(testurl + "medium");
            return resource.save({printid: printid, devid: devid, title: title}, {}, success, error);
        }
        this.printshort = function (printid, devid, title, success, error) {
            var resource = $resource(testurl + "short");
            return resource.save({printid: printid, devid: devid, title: title}, {}, success, error);
        }*/

        this.print = function (route, printinfo, body, success, error) {
            var resource = $resource(testurl + route);
            return resource.save({printid: printinfo.printid, devid: printinfo.devid, mode: printinfo.mode, ordermode: printinfo.ordermode, title: printinfo.title}, body, success, error);
        }


    }])
;
